👷 Split unit-bs CI job per browser - #4623
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 84a9b87 | Docs | Datadog PR Page | Give us feedback! |
533c184 to
61066db
Compare
e0a2b44 to
a311531
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a311531a23
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
thomas-lebeau
left a comment
There was a problem hiding this comment.
hmm, bs-wrapper.ts also checks that there is only one BS job at a time running.
This can make these job wait longer than necessary: (example)
2026-05-15T12:43:32.881957Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:44:02.930861Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:44:32.951962Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:45:03.482930Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:45:33.517166Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:46:03.548156Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:46:33.586724Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:47:03.618851Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:47:33.653588Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:48:03.683845Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:48:33.716840Z 01O �[32;1mOther build running, waiting...�[0m
2026-05-15T12:49:03.758851Z 01O �[32;1mStarting BrowserStackLocal...�[0m
I think there is another BS api that can return you the number of seats occupied, maybe we should use that instead instead of just hasRunningBuild
Each browser now runs as a separate CI job using parallel: matrix. The --browser flag on ci-bs.ts filters the Karma config to a single browser via the BS_BROWSER env var.
Wait for available sessions instead of blocking on any running build. Isolate tunnels with a unique localIdentifier per run. Add jitter to the availability check to prevent thundering herd.
be820b4 to
17b291f
Compare
Motivation
The
unit-bsjob runs all 5 browsers in a single Karma process. If one browser is unavailable on BrowserStack, the whole job fails and you lose the results from the other 4.Changes
Each browser now runs as a separate CI job using
parallel: matrix. The--browserflag onci-bs.tsfilters the Karma config to a single browser via theBS_BROWSERenv var. Without--browser, all 5 browsers run as before.bs-wrapper.tsused to wait until no BrowserStack build was running at all. Now it checks how many parallel sessions are in use and only waits if all seats are occupied. Each run also gets a uniquelocalIdentifierfor BrowserStackLocal so parallel tunnels don't interfere with each other.Test instructions
Checklist